<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>

<head>
<title>联办单位列表</title>
<link rel="stylesheet"
	href="<s:url value="/common/css/datepicker.css"/>" type="text/css" />
<script type="text/javascript"
	src="<s:url value="/common/scripts/ui.datepicker.js"/>"></script>
<script type="text/javascript">
function checkDelet(id){
	if(BaseJs.confirm('确定要删除吗？')){
		$.urlAjax('firm/EditFirm!delete?firm.id='+id,function(data){
			$('#pt' + id).remove();
		});
	}
}
</script>
</head>
<body>
<h2 class="title">联办单位列表<m:permiss permiss="FIRM_MANAGE">
	<m:imgA img="add" msg="新建" action="firm/EditFirm!toEdit" />
</m:permiss></h2>
<table class="list">
	<thead>
		<tr>
			<th width="19%">单位名称</th>
			<th width="8%">开始日期</th>
			<th width="8%">结束日期</th>
			<th width="8%">支持金额</th>
			<th width="8%">联系人</th>
			<th width="10%">联系电话</th>
			<th width="19%">地址</th>
			<th width="10%">录入人员</th>
			<m:permiss permiss="FIRM_MANAGE">
				<th width="10%">操作</th>
			</m:permiss>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="firms.items">
			<tr id="pt${id }">
				<td><s:property value="name" /></td>
				<td><s:date name="startDate" format="yyyy-MM-dd" /></td>
				<td><s:date name="endDate" format="yyyy-MM-dd" /></td>
				<td><s:property value="amount" /></td>
				<td><s:property value="linkMan" /></td>
				<td><s:property value="phone" /></td>
				<td><s:property value="address" /></td>
				<td><s:property value="createUser.name" /></td>
				<m:permiss permiss="FIRM_MANAGE">
					<td><m:imgA img="edit" msg="修改"
						action="firm/EditFirm!toEdit?firm.id=${id}" /> <m:imgA
						img="delete" msg="删除" onclick="javascript:checkDelet(${id});" /></td>
				</m:permiss>
			</tr>
		</s:iterator>
	</tbody>
</table>
<m:page value="${firms}" showSeaBar="true" />
</body>